package com.kkb.service;

import com.kkb.mapper.ResourceMapper;
import com.kkb.mapper.RoleResourceMapper;
import com.kkb.pojo.RoleResource;
import com.kkb.pojo.RoleResourceExample;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

@Service
public class RoleResourceService {

    @Resource
    RoleResourceMapper mapper;

    public List<RoleResource> selectById(int id){
        RoleResourceExample example=new RoleResourceExample();
        RoleResourceExample.Criteria criteria= example.createCriteria();
        criteria.andRoleIdEqualTo(id);
        List<RoleResource> list=mapper.selectByExample(example);
        return list;
    }
}
